package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.BatchRepairDete;
import com.indusfo.spc.pojo.BatchRepairDete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author liub
 * @Date 2019/12/6 13:20
 * @Version 1.0
 */

public interface BatchRepairDeteMapper {
    /**
     * 新增
     */
    int insertBatchRepairDete(BatchRepairDete batchRepairDete);

    /**
     * 修改
     */
    int updateBatchRepairDete(BatchRepairDete batchRepairDete);

    /**
     * 查询
     */
    List<BatchRepairDete> queryBatchRepairDete(BatchRepairDete batchRepairDete);

    /**
     * 总数
     */
    int countBatchRepairDete(BatchRepairDete batchRepairDete);

    /**
     * 判重
     */
    int checkBatchRepairDete(BatchRepairDete batchRepairDete);

    /**
     * 启停
     */
    int deleteBatchRepairDete(@Param("batchRepairDeteIds") List<Integer> batchRepairDeteIds, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询
     */
    List<BatchRepairDete> queryBatchRepairDeteByBatchRepairId(@Param("batchRepairId") Integer batchRepairId);

    /**
     * 级联删除
     */
    int deleteBatchRepairDeteByBatchRepairDeteId(@Param("batchRepairDeteId") Integer batchRepairDeteId, @Param("dataState") Integer dataState);

}